import requests

url = 'http://www.baidu.com/s?'

data = {
    'wd': 'ip'
}
headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36'
}

proxies = {
    'http': "183.238.163.8:9002"
}

response = requests.get(url=url, params=data, headers=headers, proxies=proxies)
obj = response.text
with open('ip.html', 'w', encoding='utf-8') as fp:
    fp.write(obj)
